#include <cstdlib>
#include <pthread.h>
#include <iostream>
#include <vector>
#include "client_thread.h"
#include "client_socket.h"
#define PORT 4321

using std::cout;
using std::endl;
using std::string;
using std::vector;

Client_thread::Client_thread(Client_socket* s){
    socket = s;
}

Client_thread::~Client_thread(){
}

void Client_thread::ejecutar(){
// while (corre_servidor && corre_cliente){
    // recibir:
    string buffer;			
    int numbytes;
    int tam;
    if ((numbytes = socket->recibir(&buffer,tam)) == -1){
            cout<<"Client thread recibir"<<endl;
    }
    buffer[numbytes] = '\0';
    cout<<"Clientmain-bufferrecibido: "<<buffer;
//}
return;
}